Optimal. Leaf size=125 \[ \frac {a^2 \tan (c+d x)}{d}+\frac {a b \tan ^2(c+d x)}{d}+\frac {\left (2 a^2+b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {a b \tan ^4(c+d x)}{d}+\frac {\left (a^2+2 b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {a b \tan ^6(c+d x)}{3 d}+\frac {b^2 \tan ^7(c+d x)}{7 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 125, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {3167, 962}
\begin {gather*} \frac {\left (a^2+2 b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {\left (2 a^2+b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {a^2 \tan (c+d x)}{d}+\frac {a b \tan ^6(c+d x)}{3 d}+\frac {a b \tan ^4(c+d x)}{d}+\frac {a b \tan ^2(c+d x)}{d}+\frac {b^2 \tan ^7(c+d x)}{7 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 962
Rule 3167
Rubi steps
\begin {align*} \int \sec ^8(c+d x) (a \cos (c+d x)+b \sin (c+d x))^2 \, dx &=-\frac {\text {Subst}\left (\int \frac {(b+a x)^2 \left (1+x^2\right )^2}{x^8} \, dx,x,\cot (c+d x)\right )}{d}\\ &=-\frac {\text {Subst}\left (\int \left (\frac {b^2}{x^8}+\frac {2 a b}{x^7}+\frac {a^2+2 b^2}{x^6}+\frac {4 a b}{x^5}+\frac {2 a^2+b^2}{x^4}+\frac {2 a b}{x^3}+\frac {a^2}{x^2}\right ) \, dx,x,\cot (c+d x)\right )}{d}\\ &=\frac {a^2 \tan (c+d x)}{d}+\frac {a b \tan ^2(c+d x)}{d}+\frac {\left (2 a^2+b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {a b \tan ^4(c+d x)}{d}+\frac {\left (a^2+2 b^2\right ) \tan ^5(c+d x)}{5 d}+\frac {a b \tan ^6(c+d x)}{3 d}+\frac {b^2 \tan ^7(c+d x)}{7 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.76, size = 104, normalized size = 0.83 \begin {gather*} \frac {\tan (c+d x) \left (105 a^2+105 a b \tan (c+d x)+35 \left (2 a^2+b^2\right ) \tan ^2(c+d x)+105 a b \tan ^3(c+d x)+21 \left (a^2+2 b^2\right ) \tan ^4(c+d x)+35 a b \tan ^5(c+d x)+15 b^2 \tan ^6(c+d x)\right )}{105 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.25, size = 110, normalized size = 0.88
method | result | size |
derivativedivides | \(\frac {-a^{2} \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )+\frac {a b}{3 \cos \left (d x +c \right )^{6}}+b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \left (\sin ^{3}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{3}}\right )}{d}\) | \(110\) |
default | \(\frac {-a^{2} \left (-\frac {8}{15}-\frac {\left (\sec ^{4}\left (d x +c \right )\right )}{5}-\frac {4 \left (\sec ^{2}\left (d x +c \right )\right )}{15}\right ) \tan \left (d x +c \right )+\frac {a b}{3 \cos \left (d x +c \right )^{6}}+b^{2} \left (\frac {\sin ^{3}\left (d x +c \right )}{7 \cos \left (d x +c \right )^{7}}+\frac {4 \left (\sin ^{3}\left (d x +c \right )\right )}{35 \cos \left (d x +c \right )^{5}}+\frac {8 \left (\sin ^{3}\left (d x +c \right )\right )}{105 \cos \left (d x +c \right )^{3}}\right )}{d}\) | \(110\) |
risch | \(\frac {16 i \left (-140 i a b \,{\mathrm e}^{8 i \left (d x +c \right )}+70 a^{2} {\mathrm e}^{8 i \left (d x +c \right )}-70 b^{2} {\mathrm e}^{8 i \left (d x +c \right )}-140 i a b \,{\mathrm e}^{6 i \left (d x +c \right )}+175 a^{2} {\mathrm e}^{6 i \left (d x +c \right )}+35 b^{2} {\mathrm e}^{6 i \left (d x +c \right )}+147 a^{2} {\mathrm e}^{4 i \left (d x +c \right )}-21 b^{2} {\mathrm e}^{4 i \left (d x +c \right )}+49 a^{2} {\mathrm e}^{2 i \left (d x +c \right )}-7 b^{2} {\mathrm e}^{2 i \left (d x +c \right )}+7 a^{2}-b^{2}\right )}{105 d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{7}}\) | \(171\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 91, normalized size = 0.73 \begin {gather*} \frac {7 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 10 \, \tan \left (d x + c\right )^{3} + 15 \, \tan \left (d x + c\right )\right )} a^{2} + {\left (15 \, \tan \left (d x + c\right )^{7} + 42 \, \tan \left (d x + c\right )^{5} + 35 \, \tan \left (d x + c\right )^{3}\right )} b^{2} - \frac {35 \, a b}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{3}}}{105 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.75, size = 100, normalized size = 0.80 \begin {gather*} \frac {35 \, a b \cos \left (d x + c\right ) + {\left (8 \, {\left (7 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{6} + 4 \, {\left (7 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{4} + 3 \, {\left (7 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + 15 \, b^{2}\right )} \sin \left (d x + c\right )}{105 \, d \cos \left (d x + c\right )^{7}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.49, size = 118, normalized size = 0.94 \begin {gather*} \frac {15 \, b^{2} \tan \left (d x + c\right )^{7} + 35 \, a b \tan \left (d x + c\right )^{6} + 21 \, a^{2} \tan \left (d x + c\right )^{5} + 42 \, b^{2} \tan \left (d x + c\right )^{5} + 105 \, a b \tan \left (d x + c\right )^{4} + 70 \, a^{2} \tan \left (d x + c\right )^{3} + 35 \, b^{2} \tan \left (d x + c\right )^{3} + 105 \, a b \tan \left (d x + c\right )^{2} + 105 \, a^{2} \tan \left (d x + c\right )}{105 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.83, size = 130, normalized size = 1.04 \begin {gather*} \frac {\frac {b^2\,\sin \left (c+d\,x\right )}{7}+{\cos \left (c+d\,x\right )}^2\,\left (\frac {a^2\,\sin \left (c+d\,x\right )}{5}-\frac {b^2\,\sin \left (c+d\,x\right )}{35}\right )+{\cos \left (c+d\,x\right )}^4\,\left (\frac {4\,a^2\,\sin \left (c+d\,x\right )}{15}-\frac {4\,b^2\,\sin \left (c+d\,x\right )}{105}\right )+{\cos \left (c+d\,x\right )}^6\,\left (\frac {8\,a^2\,\sin \left (c+d\,x\right )}{15}-\frac {8\,b^2\,\sin \left (c+d\,x\right )}{105}\right )+\frac {a\,b\,\cos \left (c+d\,x\right )}{3}}{d\,{\cos \left (c+d\,x\right )}^7} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________